package com.example.business_oa.controller;

import com.example.business_oa.service.CallService;
import com.example.comment_oa.pojos.RepairRecord;
import com.example.comment_oa.response.AjaxResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @Description:
 * @Author:陈旭良
 * @Documents_And_Settings:liang
 * @Date:2022/10/20 15:50
 * @Entry_Name:my_springcloud_project01cangku
 */
@RestController
@CrossOrigin
@RequestMapping("/businessOa")
public class CallController {
    @Resource
    CallService callService;

    @PostMapping("/Call/DeptAll")
    public AjaxResponse DeptAll(){
        return AjaxResponse.success(callService.DeptAll());
    }

    @GetMapping("/Call/PositionAll/{PositionAllId}")
    public AjaxResponse Position(@PathVariable("PositionAllId") int PositionAllId){
        return AjaxResponse.success(callService.PositionAll(PositionAllId));
    }

//    @PostMapping("/UserId")
//    public AjaxResponse UserId(@RequestBody RepairRecord repairRecord){
//        return AjaxResponse.success(callService.UserId(repairRecord));
//    }

}
